<!DOCTYPE HTML>
<html lang="zh-hans" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="Bookmark" th:href="@{/favicon.ico}">
    <link rel="Shortcut Icon" th:href="@{/favicon.ico}"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" th:src="@{/lib/html5shiv.js}"></script>
    <script type="text/javascript" th:src="@{/lib/respond.min.js}"></script>
    <![endif]-->
    <link rel="stylesheet" th:href="@{/css/simpleControl.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/lib/Hui-iconfont/1.0.8/iconfont.css}"/>
    <link rel="stylesheet" th:href="@{/Semantic-UI-CSS-master/semantic.min.css}">
    <link rel="stylesheet" th:href="@{/css/myEvents.css}">
    <link rel="stylesheet" th:href="@{/editor.md-master/css/editormd.min.css}">
    <script type="text/javascript" th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/Semantic-UI-CSS-master/semantic.min.js}"></script>
    <!--[if IE 6]>
    <script type="text/javascript" th:src="@{/lib/DD_belatedPNG_0.0.8a-min.js}"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>活动发布</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 活动管理 <span
        class="c-gray en">&gt;</span> 活动发布 </nav>
<div class="m-container-small m-padded-tb-big">
    <div class="ui container">
        <form th:action="@{/events/events}" method="post" class="ui form">
            <!--用此种方式可以把提交方式变成put，原理就是SpringBoot默认维护了一个WebMvcAutoConfiguration，其中如果有_method就改变请求方式
             不过SpringBoot项目得在配置中开启，默认是关闭的 spring.mvc.hiddenmethod.filter.enabled=true-->
            <input type="hidden" name="_method" th:value="${method}"/>
            <input type="hidden" name="eventsID" th:value="${events.eventsID}">
            <div class="field required">
                <div class="ui right labeled action input ">
                    <input type="text" name="eventsTitle" placeholder="标题" th:value="${events.eventsTitle}">
                </div>
            </div>
            <input id="eventsContent" th:value="${events.eventsContent}" type="hidden">
            <div class="field">
                <div id="md-content" style="z-index: 1 !important;">
                    <textarea name="eventsContent" placeholder="活动内容" th:text="${events.eventsContent}"></textarea>
                    [TOC]
                    #### Disabled options

                    - TeX (Based on KaTeX);
                    - Emoji;
                    - Task lists;
                    - HTML tags decode;
                    - Flowchart and Sequence Diagram;

                    #### Editor.md directory

                    editor.md/
                    lib/
                    css/
                    scss/
                    tests/
                    fonts/
                    images/
                    plugins/
                    examples/
                    languages/
                    editormd.js
                    ...

                    ```html
                </div>
            </div>

            <div class="ui right aligned container">
                <button type="submit" class="ui button teal" name="status" value="0">保存</button>
                <button type="submit" class="ui button red" name="status" value="1">发布</button>
            </div>
            <h1 style="font-size: 18px" th:text="${message}"></h1>
        </form>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script th:src="@{/editor.md-master/editormd.min.js}"></script>
<script type="text/javascript" th:src="@{/js/eventsAdd.js}"></script>
</body>
</html>